﻿using System.Collections.Generic;
using System.Threading.Tasks;

namespace Jiffy.Core.Sys.Service
{
    public interface ISysCacheService
    {
        Task AddCacheKey(string cacheKey);

        //Task<List<long>> GetDataScope(long userId);

        //Task<List<AntDesignTreeNode>> GetMenu(long userId, string appCode);

        //Task<List<string>> GetPermission(long userId);

        Task Delete(string key);

        Task DeleteByPattern(string key);

        Task DeleteByKey(string cacheKey);


        //Task SetDataScope(long userId, List<long> dataScopes);

        //Task SetMenu(long userId, string appCode, List<AntDesignTreeNode> menus);

        //Task SetPermission(long userId, List<string> permissions);

        Task UpdateString(string cacheKey, string value);


        Task UpdateObject(string cacheKey, object value);


        Task<string> Get(string cacheKey);

        Task<T> Get<T>(string cacheKey);

        Task<List<string>> GetList();

        bool Exists(string cacheKey);

    }
}